(function() {

    var $u = juliet.using({ validator : 'juliet.validation.validator' });

    var RadioClass = function() {

        this.validate = function() {
            var
            value = this.chain.fieldValueHelper.fieldValue,
            correctValue = this.getOptionValue('correctValue');

            this.result = ((value === correctValue) ? vr.SUCCESS : vr.FAILED);
        };

        this.getError = function() {
            return this.base.getError.call(this, 'radio');
        };

    };

    $u('validator').addValidator('Radio', RadioClass);

})();
